package com.web.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import com.web.model.UserModel;
import com.web.params.PersonEditParams;
import com.web.params.RegistryParams;



public interface UserMapper {
    int registry(RegistryParams parpams);
    
    @Select("select username from td_user where username =#{username}")
    String hasUsername(@Param("username")String username);
    
    @Select("select nick_name from td_user "
    		+ "where nick_name =#{nickName}"
    		+ "and username != #{username}")
    String hasnickName(@Param("nickName")String nickName,
  		  @Param("username")String username);
    
    @Select("select mailbox from td_user where username =#{username}")
    String hasMailbox(@Param("username")String username);
    
   
    @Select("select password from td_user where username =#{username}")
    String login(String username);
    
    int updateperson(PersonEditParams params);
    UserModel getuser(String username);

}


    
                     





